{assign var=formId value='list'}
<div id="content">
    <div class="highlight">
        {include file="admin/config_modules/menu.temp.html" title=menu}
        {include file="admin/toolbar.temp.html" title=toolbar}
        <div class="searchType">
        <form action="{$base_url}" method="post" name="searchMenu" id="searchMenu">
            <fieldset>
                <h3>{l s='search_for'}</h3>
                <p>
                    <label>{l s='keyword'}</label>
                    <input type="text" value="{if isset($searchTerms)}{$searchTerms}{/if}" id="searchTerms" name="searchTerms" />
                    <label>{l s='status'}</label>
                    <select id="searchStatus" name="searchStatus">
                        <option value="-1">{l s='all'}</option>
                        {$listStatus}
                    </select>
                    <input type="hidden" id="op"  name="op"value="{$op}" />
                    <input type="hidden" id="act" name="act" value="{$act}" />
                    <input type="submit" value="{l s='display'}" title="{l s='display'}" name="btnDisplay" class="btnDisplay" />
                </p>
            </fieldset>
        </form>
        </div>
        {if $infoText}
        <div class="{$infoClass}">
            <h4>Result:</h4>
            <p>{$infoText}</p>
        </div>
        {/if}
        <form id="{$formId}" name="{$formId}" action="{$base_url}" method="post">
            <div class="tableContent">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <thead>
                    <tr>
                        <th><input class="box3" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('{$formId}');" /></th>
                        <th>{l s='no'}</th>
                        <th><a href="{$base_url}/{$op}/act/list/pid/{$pid}/typeid/{$typeid}/searchTerms/{$searchTerms}/searchStatus/{$searchStatus}/orderBy/code/orderDir/{if $orderBy eq 'code' && $orderDir eq 'ASC'}DESC{else}ASC{/if}" title="{l s='click_here_to_sort_by'} {l s='namemodules'}">{l s='namemodules'} {if $orderBy eq 'vn_name'}&nbsp;<img src="templates/{$usertemplate}/images/ico_{if $orderDir eq 'DESC'}down{else}up{/if}.gif" alt="" width="12" height="12" />{/if}</a></th>
                        <th>{l s='descriptionmodules'}</th>
                        <th>{l s='menu'}</th>
                        <th>{l s='position'}</th>
                        <th>{l s='status'}</th>
                        <th>{l s='actions'}</th>
                    </tr>
                </thead>
                <tbody>
                    {if $listObjects}
                        {assign var=i value=$listObjects.pages.start}
                        {foreach from=$listObjects.data item=object}
                            {assign var=i value=$i+1}
                            <tr{if $i%2 == 0} class="bgType"{/if}>
                                <td><input class="box3" type="checkbox" name="oIds[]" id="oIds" value="{$object->getField('id')}" /></td>
                                <td>{$i|number_format}</td>
                                <td><a href="{$base_url}/{$op}/act/list/pid/{$object->getField('id')}/typeid/{$typeid}">{$object->getField('code')}</a></td>
                                <td><a href="{$base_url}/{$op}/act/list/pid/{$object->getField('id')}/typeid/{$typeid}">{$object->getFieldLangAdmin($lang, 'name')}</a></td>
                                <td>{if $object->getField('ismenu') eq 1}<font style="color:#F00">{l s='primenu'}</font>{elseif $object->getField('ismenu') eq 2}<font style="color:#00F">{l s='confimenu'}</font>{else}{l s='nomenu'}{/if}</td>
                                <td>
                                    <input type="text" class="position" oId="{$object->getField('id')}" value="{$object->getField('position')}" />
                                </td>
                                <td>{if $object->isDeleted()}<span style="color: #FF0000">{$object->getStatusText()}</span>{else}{$object->getStatusText()}{/if}</td>
                
                                <td>
                                    {include file="admin/action.temp.html" title=action}
                                </td>
                            </tr>
                        {/foreach}
                    {/if}
                </tbody>
                </table>
                <div class="paging">
                    <p class="btnType">
                        <input type="hidden" id="op"  name="op" value="{$op}" />
                        <input type="hidden" id="act" name="act" value="{$act}" />
                        <input type="hidden" id="typeid" name="typeid" value="{$typeid}" />
                        <input type="hidden" id="pid" name="pid" value="{$pid}" />
                        <input type="hidden" id="searchTerms" name="searchTerms" value="{$searchTerms}"/>
                        <input type="hidden" id="searchStatus" name="searchStatus" value="{$searchStatus}"/>
                        <input type="hidden" id="orderBy" name="orderBy" value="{$orderBy}"/>
                        <input type="hidden" id="orderDir" name="orderDir" value="{$orderDir}"/>
                        <input type="hidden" id="page" name="page" value="{$page}"/>
                        <input type="hidden" id="oId" name="oId" value=""/>
                        <input type="hidden" id="position" name="position" value=""/>
                        <input type="hidden" id="plus" name="plus" id="plus" value=""/>
                    </p>
                    {include file="admin/paging.temp.html" title=paging}
                </div>
            </div>
        </form>
    </div>
</div>